package com.css.casualties.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.css.casualties.entity.RyswModel4Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Dbj
 * @date 2024年09月14日  9:36
 */
@Mapper
public interface RyswModel4DataMapper extends BaseMapper<RyswModel4Data> {
    @Select("select *,st_astext(ST_Intersection(geom, st_geometryfromtext(#{geom},#{code}))) as intersectGeom from basic_rysw_model4_data where intensity=#{intensity} and ST_Intersects(geom, st_geometryfromtext(#{geom},#{code}))")
    List<RyswModel4Data> getIntersectYsx(@Param("geom") String geom, @Param("code") String code, @Param("intensity") String intensity);
}
